<include file="public@header"/>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header">
            <h3>会员列表</h3>
        </div>
        <div class="layui-card-body">
            <form class="form-search layui-form layui-form-item clearfix" action="{:url('member/adminIndex/index')}">
                <div class="layui-col-md11 layui-col-sm10">
                    <div class="layui-inline">
                        <label class="layui-form-label">用户ID：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                               placeholder="请输入用户ID">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">关键字：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
                               placeholder="用户名/昵称/手机号码">
                        </div>
                    </div>
                    
                    <div class="layui-inline">
                        <input type="submit" class="layui-btn layui-btn-normal" value="搜索"/>
                    </div>
                    <div class="layui-inline">
                        <a class="layui-btn layui-btn-danger" href="{:url('member/adminIndex/index')}">清空</a>
                    </div>
                </div>
            </form>
        
        </div>
        <form method="post" class="js-ajax-form">
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>{:lang('USERNAME')}/{:lang('NICENAME')}</th>
                    <!-- <th>{:lang('NICENAME')}</th> -->
                    <!-- <th>{:lang('AVATAR')}</th> -->
                    <!-- <th>{:lang('EMAIL')}</th> -->
                    <th>手机</th>
                    <th>角色</th>
                    <th>所属部门</th>
                    <th>{:lang('LAST_LOGIN_TIME')}</th>
                    <th>{:lang('LAST_LOGIN_IP')}</th>
                    <th>{:lang('STATUS')}</th>
                    <th>{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <php>
                    $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
                </php>
                <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
                        </td>
                        <!-- <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td> -->
                        <!-- <td><img width="25" height="25" src="{:url('member/public/avatar',array('id'=>$vo['id']))}"/></td> -->
                        <!-- <td>{$vo.user_email}</td> -->
                        <td>{$vo.mobile}</td>
                        <td>
                            {$vo.tagname}
                        </td>
                        <td>{$vo.department}</td>
                        <td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
                        <td>{$vo.last_login_ip}</td>
                        <td>{$user_statuses[$vo['user_status']]}</td>
                        <td>
                            <!-- <neq name="vo.id" value="1">
                                <empty name="vo.user_status">
                                    <a href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
                                       class="js-ajax-dialog-btn"
                                       data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
                                    <else/>
                                    <a href="{:url('adminIndex/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                                       data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
                                </empty>
                                <else/>
                                <a style="color: #ccc;">{:lang('BLOCK_USER')}</a>
                            </neq> -->
                            <a href="{:url('AdminIndex/edit',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs">查看</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
            <if condition="$page">
                <div class="pagination-row clearfix">
                    <div class="pages">{$page|default=''}</div>
                </div>
            </if>
        </form>
    </div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
